package com.yqg.education.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yqg.education.controller.dto.UserDTO;
import com.yqg.education.controller.dto.UserPasswordDTO;
import com.yqg.education.entity.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

/**
 * IUserService 服务类
 * @author zxf
 * @since 2025-03-01
 */
public interface IUserService extends IService<User> {

    UserDTO login(UserDTO userDTO);

    User register(UserDTO userDTO);

    void updatePassword(UserPasswordDTO userPasswordDTO);

    int resetPwd(int id, String password, Date date);

    UserDTO getUserInfo(HttpServletRequest request,String flag);

    /**
     * 根据用户ID查询对应课程ID
     * @param userId 用户ID
     * @return 课程ID所组成的List集合
     */
    List<Long> getCourseIdByUserId(Integer userId);

    void importData(MultipartFile file);

    void exportStu(HttpServletResponse response, String name, String telephone, Integer roleId, Integer classId);
}
